package com.example.es.util;

import org.apache.http.HttpHost;
import org.elasticsearch.client.Node;
import org.elasticsearch.client.RestClient;
import org.elasticsearch.client.RestClientBuilder;
import org.elasticsearch.client.RestHighLevelClient;

/**
 * @description: some desc
 * @author: ruoan
 * @date: 2020/10/11 11:45
 */
public class EsRestHighLevelClient {


    public static RestHighLevelClient getClient(){
        HttpHost httpHost = new HttpHost("192.168.237.128",9200);
        RestClientBuilder restClientBuilder = RestClient.builder(httpHost);
        RestHighLevelClient client = new RestHighLevelClient(restClientBuilder);
        return client;


    }
}
